package com.kingyun.gpsinspection.purificationservice.services.jsm.innerservice.impl.dataitem;
/**
 * Created by Administrator on 2017/3/25.
 */

import com.kingyun.gpsinspection.purificationservice.dao.mapper.jsm.DataitemMapper;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.Dataitem;
import com.kingyun.gpsinspection.purificationservice.facade.service.jsm.dataitem.JsmDataitemService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Author 卢曼成
 * @Description 数据项接口实现类
 * @CreateDateTime 2017-03-25 13:03
 **/

public class JsmDataitemServiceImpl implements JsmDataitemService {
    @Autowired
    private DataitemMapper dataitemMapper;

    /**
     * 根据ID删除
     *
     * @param itemId
     * @return
     */
    @Override
    public int deleteByPrimaryKey(Long itemId) {
        return dataitemMapper.deleteByPrimaryKey(itemId);
    }
    /**
     * 添加
     *
     * @param record
     * @return
     */
    @Override
    public int insert(Dataitem record) {
        return dataitemMapper.insert(record);
    }
    /**
     * 非空添加
     *
     * @param record
     * @return
     */
    @Override
    public int insertSelective(Dataitem record) {
        return dataitemMapper.insertSelective(record);
    }
    /**
     * 根据ID查询
     *
     * @param itemId
     * @return
     */
    @Override
    public Dataitem selectByPrimaryKey(Long itemId) {
        return dataitemMapper.selectByPrimaryKey(itemId);
    }
    /**
     * 非空修改
     *
     * @param record
     * @return
     */
    @Override
    public int updateByPrimaryKeySelective(Dataitem record) {
        return dataitemMapper.updateByPrimaryKeySelective(record);
    }
    /**
     * 修改
     *
     * @param record
     * @return
     */
    @Override
    public int updateByPrimaryKey(Dataitem record) {
        return dataitemMapper.updateByPrimaryKey(record);
    }
    /**
     * @param record
     * @return List<dataitem>
     * @Author 卢曼成
     * @Description 根据条件查询集合
     * @CreateDateTime 2017/3/24 19:38
     **/
    @Override
    public List<Dataitem> selectByParamList(Dataitem record) {
        return dataitemMapper.selectByParamList(record);
    }
}
